package com.demo.project_template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 规格表
 * </p>
 *
 * @author 杨玉龙
 * @since 2023-06-19 15:56:44
 */
@Data
@TableName("t_product_spec")
@ApiModel(value = "ProductSpec对象", description = "规格表")
public class ProductSpec implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
      @TableId(value = "product_specs_id", type = IdType.AUTO)
    private Integer productSpecsId;

    @ApiModelProperty("商品外键")
    @TableField("product_id")
    private Integer productId;

    @ApiModelProperty("商品规格")
    @TableField("product_spec")
    private String productSpec;

    @ApiModelProperty("商品库存")
    @TableField("stock")
    private Integer stock;

    @ApiModelProperty("商品价格")
    @TableField("product_price")
    private BigDecimal productPrice;

    @ApiModelProperty("是否删除(0=否，1=是)")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("更新时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private List<String> serviceSpecs;

}
